const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const { BaseParameter } = require('../base/model')

const studySchema = new Schema({
  ...BaseParameter,
  /**
   * 标题
   */
  "title": {type: String, default: ''},
  /**
   * 时间
   */
  "date": {type: Date, default: new Date()},
  /**
   * 类型
   */
  "type": {type: String, default: ''},
  /**
   * 内容
   */
  "content": {type: String, default: ''},
  /**
   * 描述
   */
  "describe": {type: String, default: ''},
  /**
   * 图片链接
   */
  "pic": {type: String, default: ''}
});

const Study = mongoose.model('Study', studySchema, 'studys');

module.exports = Study
